{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>反馈详情</h5>
                </div>
                <div class="ibox-content layui-form">
                    <div class="layui-row layui-col-space10 layui-form-item ">
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">反馈内容：</label>
                            <div class="layui-input-block">
                                <textarea class="layui-input" style="height:100px" disabled>{$res.feedback_content}</textarea>
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">联系电话：</label>
                            <div class="layui-input-block">
                                <input type="text" value="{$res.feedback_phone}" class="layui-input" disabled>
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">反馈时间：</label>
                            <div class="layui-input-block">
                                <input type="text" value="{$res.feedback_time}" class="layui-input" disabled>
                            </div>
                        </div>
                        {if $res.feedback_status==1}
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8 form-group">
                            <label class="layui-form-label">处理状态：</label>
                            <div class="layui-input-block">
                                未处理 <input name="status" type="radio" class="layui-input" value="1" checked />
                                已处理 <input name="status" type="radio" class="layui-input" value="2" />
                            </div>
                        </div>
                        {/if}
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">处理备注：</label>
                            <div class="layui-input-block">
                                <textarea name="content" class="layui-input" style="height:100px">{$res.feedback_handle_content}</textarea>
                            </div>
                        </div>
                        <input type="hidden" name="fid" value="{$res.feedback_id}" />
                        <div class="layui-form-item layui-col-xs-offset1 layui-col-xs8">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit="" lay-filter="component-form-element">保存
                                </button>
                                <button class="layui-btn layui-btn-primary" onclick="wk.layer_close('close')">关闭</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
</body>
</html>
<script>
    layui.use(['form'], function() {
        var form = layui.form;
        form.on('submit(component-form-element)', function (data) {
            $('button').addClass('layui-disabled').attr('disabled','disabled');
            $.ajax({
                url:"{:url('handle')}",
                type:'post',
                dataType:'json',
                data:data.field,
                success:function(res){
                    if (res.code == 200) {
                        layer.msg(res.msg,{icon:1,time:1500,shade:0.1},function(index){
                            wk.layer_close();
                        })
                    } else {
                        $("button").removeClass('layui-disabled').removeAttr('disabled');
                        wk.error(res.msg);
                        return false;
                    }
                }
            })
        });
    });
</script>